<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
  (function (doc, win) {
    var docEl = doc.documentElement,
      resizeEvt = 'orientationchange' in win? 'orientationchange' : 'resize',
      recalc = function () {
        //  var clientWidth = docEl.clientWidth;
        // if (clientWidth === undefined) return;
//                 docEl.style.fontSize = 20 * (clientWidth / 320) + 'px';
        var clientHeight=docEl.clientHeight;
        // console.log(clientHeight);
        if(clientHeight == undefined)return;
        docEl.style.fontSize = 20 * (clientHeight / 685) + 'px';
      };
    if (doc.addEventListener === undefined) return;
    win.addEventListener(resizeEvt, recalc, false);
    doc.addEventListener('DOMContentLoaded', recalc, false)
  })(document, window);
</script>
</html>
